Skip to content

Instantly share code, notes, and snippets.

View NewEXE's full-sized avatar
🌀
WIP

Vlad Voloshyn NewEXE

🌀
WIP
  • Sweet Stack Digital
  • Ukraine, Kharkiv
View GitHub Profile
# -*- coding: utf-8 -*-
# IT'S PYTHON2.7
# Check which pip version do you have: pip --version
# Then you need to install
# pip install requests
# -*- coding: utf-8 -*-
import time
import sys
import requests
import itertools
@mkaraki
mkaraki / install_ffmpeg_codec_for_opera.sh
Created February 15, 2020 10:09
Install ffmpeg codec for Opera in Linux (Ubuntu)
#!/bin/bash
# for Ubuntu
# Install pre-requirements
sudo apt-get update
sudo apt-get install -y chromium-codecs-ffmpeg-extra
# Import to opera
sudo ln -sf /usr/lib/chromium-browser/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so
const express = require('express');
const app = express();
// Application
app.get('/', function(req, res) {
if (process.env.NODE_ENV === 'development') {
for (var key in require.cache) {
delete require.cache[key];
}
}
@Ciantic
Ciantic / example-typeorm-jest.test.ts
Created April 16, 2019 17:50
Example of testing TypeOrm with Jest and Sqlite in-memory database
import { createConnection, getConnection, Entity, getRepository } from "typeorm";
import { PrimaryGeneratedColumn, Column } from "typeorm";
@Entity()
export class MyEntity {
@PrimaryGeneratedColumn()
id?: number;
@Column()
name?: string;
@MatteoOreficeIT
MatteoOreficeIT / LaravelQueryJoinRelations.php
Last active October 14, 2023 08:45
Laravel Query Join through Relations
<?php
/**
* User: matteo.orefice
* Date: 16/02/2018
* Time: 16:57
*/
namespace MatteoOrefice\Illuminate\Database\Eloquent\Concerns;
@ryanguill
ryanguill / postgres-merge-arrays.sql
Created December 21, 2016 16:41
in postgres, there currently isnt a function to combine two arrays and remove duplicates - this will do that.
CREATE OR REPLACE FUNCTION mergeArrays (a1 ANYARRAY, a2 ANYARRAY) RETURNS ANYARRAY AS $$
SELECT ARRAY_AGG(x ORDER BY x)
FROM (
SELECT DISTINCT UNNEST($1 || $2) AS x
) s;
$$ LANGUAGE SQL STRICT;
@joncardasis
joncardasis / Storing-Images-On-Github.md
Last active February 2, 2024 02:30
Storing Images and Demos in your Repo

Storing Images and Demos in your Repo

In this quick walkthough you'll learn how to create a separate branch in your repo to house your screenshots and demo gifs for use in your master's readme.

How to

1. Clone a fresh copy of your repo

In order to prevent any loss of work it is best to clone the repo in a separate location to complete this task.

2. Create a new branch

Create a new branch in your repo by using git checkout --orphan assets

@ivanvermeyen
ivanvermeyen / EnsureQueueListenerIsRunning.php
Last active February 13, 2024 12:40
Ensure that the Laravel queue listener is running with "php artisan queue:checkup" and restart it if necessary. You can run this automatically with a cron job: http://laravel.com/docs/scheduling
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class EnsureQueueListenerIsRunning extends Command
{
/**
* The name and signature of the console command.
@rxaviers
rxaviers / gist:7360908
Last active May 8, 2024 23:25
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: