Skip to content

Instantly share code, notes, and snippets.

View SumonMSelim's full-sized avatar
🎯
Focusing

Muhammad Sumon Molla Selim SumonMSelim

🎯
Focusing
View GitHub Profile
@ohid
ohid / PHP Array of Animate.css animation styles
Last active January 5, 2022 17:17
An array of all animation style names from animate.css
$animations = array(
'bounce' => 'bounce',
'flash' => 'flash',
'pulse' => 'pulse',
'rubberBand' => 'rubberBand',
'shake' => 'shake',
'swing' => 'swing',
'tada' => 'tada',
'wobble' => 'wobble',
'jello' => 'jello',
<?php
$template =[
'@name@' => [
'User name',
'Anik',
],
'@email@' => [
'Email',
'my.mail@mail.com'
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

import requests
from BeautifulSoup import BeautifulSoup as BS
import re
def get_dl_page(package_id):
get_request = requests.get('https://apkpure.com/search?q=' + package_id)
page = BS(get_request.text)
# it is assumed that the first search result is the thing we are looking for
link_ps = page.findAll('p', {'class': 'search-title'})
page_link = link_ps[0].a.get('href')
@adamwathan
adamwathan / belongs-to-many.sublime-snippet
Last active October 19, 2020 16:59
Eloquent Relationship snippets for Sublime Text
<snippet>
<content><![CDATA[
public function ${1:relationship}()
{
return \$this->belongsToMany(${1/^(.+)$/(?1\u$1:)/g}::class, {$2:table});
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>belt</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@masnun
masnun / top_likers.py
Created March 5, 2016 21:17
Facebook Top Likers
import facebook
from collections import Counter
import requests
likes_counter = Counter()
# Get temp tokens at: https://developers.facebook.com/tools/explorer/
USER_ACCESS_TOKEN = ""
client = facebook.GraphAPI(access_token=USER_ACCESS_TOKEN, version='2.5')
@JeffreyWay
JeffreyWay / routes.php
Last active August 18, 2019 00:06
This route will require authentication with a valid api_token, and then return the relevant user, as JSON. - https://laracasts.com/series/whats-new-in-laravel-5-2/episodes/5
<?php
Route::group([
'prefix' => 'api/v1',
'middleware' => ['api', 'auth:api']
], function () {
Route::get('/', function () {
return Auth::guard('api')->user();
});
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split("");
function f() {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1
@tsaqib
tsaqib / ideas.md
Last active April 14, 2024 12:48
Ideas that you can use for hackathons, competitions and research.

Ideas

I have collected and moderated these ideas from various public sources and put into one place so that problem solvers and solution developers may find inspirations. Because I wish to update it regularly, I have setup as a single page wiki. You may try these ideas on hackathons/competitions/research; some are quite intense problems and some are not. Many of the problems were prepared keeping Dhaka/Bangladesh in mind, but of course can be applied to just about any underdeveloped/developing and sometimes developed countries.

Categories:
  • Eradicate Extreme Poverty and Hunger
  • Education
  • Healthcare
  • Governance